
export function errLog(e){
    console.log(e.stack);
}
export function stdlog(msg){
    console.log(msg);
}
export function timerStart(){
    console.log("--- timerStart ---")
    return Game.cpu.__startTime = Game.cpu.__startTimerTime = Game.cpu.getUsed();
}
export function timerLog(msg){
    if(!Game.cpu.__startTimerTime){
        return Game.cpu.__startTimerTime = 0;
    }
    let oldTime = Game.cpu.__startTimerTime;
    if(msg){
        console.log(msg+':', (Game.cpu.__startTimerTime = Game.cpu.getUsed()) - oldTime);
    }else{
        console.log((Game.cpu.__startTimerTime = Game.cpu.getUsed()) - oldTime);
    }
    return Game.cpu.__startTimerTime;
}
export function timerEnd(){
    console.log("total:",Game.cpu.getUsed() - Game.cpu.__startTime);
    console.log("--- timerEnd ---");
    Game.cpu.__startTimerTime = undefined;
    Game.cpu.__startTime = undefined;
}